package com.yycx.module.bus.client.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yycx.common.mybatis.annotation.TableAlias;
import com.yycx.common.mybatis.base.entity.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 付款单
 *
 * @author flyme
 * @date 2020-09-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bus_payment")
@TableAlias("payment")
@ApiModel(value = "BusPayment对象", description = "付款单")
public class BusPayment extends AbstractEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "paymentId", type = IdType.ASSIGN_ID)
    private Long paymentId;

    @ApiModelProperty(value = "父ID(当单据是厂家返款时值为开票税金ID)")
    private Long parentId;

    @ApiModelProperty(value = "付款事项")
    private String title;

    @ApiModelProperty(value = "收款单位名称")
    private String payeeName;

    @ApiModelProperty(value = "流程实例ID")
    private String processInstanceId;

    @ApiModelProperty(value = "单号")
    private String paymentNo;

    @ApiModelProperty(value = "账套ID")
    private Long companyId;

    @ApiModelProperty(value = "机构ID")
    private Long organizationId;

    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    @ApiModelProperty(value = "部门名称")
    private String deptName;


    @ApiModelProperty(value = "资金类型")
    private String amountType;

    @ApiModelProperty(value = "冲抵底价货款")
    private Integer floorAmount;

    @ApiModelProperty(value = "订单ID")
    private String orderId;

    @ApiModelProperty(value = "订单明细ID")
    private String orderDetailsId;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "可用金额")
    private BigDecimal surplusAmount;

    @ApiModelProperty(value = "交易金额计算公式")
    private Long amountFormulaId;

    @ApiModelProperty(value = "应返/结算/金额")
    private BigDecimal supplierRetable;

    @ApiModelProperty(value = "开票金额")
    private BigDecimal invoiceAmount;

    @ApiModelProperty(value = "税金")
    private BigDecimal taxAmount;

    @ApiModelProperty(value = "不含税开票金额")
    private BigDecimal noTaxAmount;

    @ApiModelProperty(value = "二次开票金额")
    private BigDecimal senondInvoiceAmount;

    @ApiModelProperty(value = "二次开票税金")
    private BigDecimal secondTaxAmount;

    @ApiModelProperty(value = "已退金额")
    private BigDecimal returnAmount;

    @ApiModelProperty(value = "发票类型")
    private Integer invoiceType;

    @ApiModelProperty(value = "发票ID")
    private Long invoiceId;

    @ApiModelProperty(value = "是否包票")
    private Integer baopiao;

    @ApiModelProperty(value = "开票单位")

    private Long invoiceUnitId;

    @ApiModelProperty(value = "收付款申请结算日期")
    private Date amountDate;

    @ApiModelProperty(value = "认款日期")
    private Date renDate;

    @ApiModelProperty(value = "支付日期")
    private Date payDate;

    @ApiModelProperty(value = "支付人")
    private Long payUserId;

    @ApiModelProperty(value = "支付人姓名")
    private String payUserName;

    @ApiModelProperty(value = "是否打印")
    private Integer printTag;

    @ApiModelProperty(value = "按流向结算类型(1 渠道商 2 商务经理 3 片区服务商 4 商务总负责人)")
    private Integer settleType;

    @ApiModelProperty(value = "回款方式(1 普通转账 2 电汇 3 承兑 )")
    private Integer remitType;

    @ApiModelProperty(value = "商品类型")
    private String drugType;

    @ApiModelProperty(value = "收款银行账户")
    private Long bankId;

    @ApiModelProperty(value = "收款银行")
    private String bankName;

    @ApiModelProperty(value = "收款银行账户")
    private String bankNo;

    @ApiModelProperty(value = "付款银行账户")
    private Long payBankId;

    @ApiModelProperty(value = "付款银行名称")
    private String payBankName;

    @ApiModelProperty(value = "付款银行账号")
    private String payBankNo;

    @ApiModelProperty(value = "状态0:未完成 1:审批中，2：已审批")
    private Integer paymentState;

    @ApiModelProperty(value = "申请人")
    private Long userId;

    @ApiModelProperty(value = "申请人姓名")
    private String nickName;

    @ApiModelProperty(value = "购货方")
    private String customId;

    @ApiModelProperty(value = "供货方")
    private Long supplierId;

    @ApiModelProperty(value = "业务员ID")
    private Long saleManId;

    @ApiModelProperty(value = "业务员编码")
    private String saleManCode;

    @ApiModelProperty(value = "备注")
    private String remark;


    @ApiModelProperty(value = "申请记录")
    private String selectIds;

    @ApiModelProperty(value = "业务区域")
    private String businessArea;

    @ApiModelProperty(value = "发货区域")
    private String sendArea;

    @ApiModelProperty(value = "提前认款")
    private Integer advanceState;

    @ApiModelProperty(value = "银行流水")
    private String bankStatementId;

    @ApiModelProperty(value = "申请部门")
    private String applyDeptName;

    @ApiModelProperty(value = "销售额(服务协议)")
    private BigDecimal saleAmount;

    @ApiModelProperty(value = "结算周期起始日期(服务协议)")
    private Date settleBeginDate;

    @ApiModelProperty(value = "结算周期截止日期(服务协议)")
    private Date settleEndDate;


}
